package com.ca.project.Server.Modules.UserInfo.PO;

import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
import org.hibernate.validator.constraints.Length;

import javax.validation.constraints.NotBlank;
import java.io.Serializable;

/**
 * @Description
 * @Author:你好呀小陳同學
 * @CreateTime:21/9/202316:43
 */
@Data
@ApiModel(value = "用户个人信息")
public class UserInfoUpdatePO implements Serializable {

    private static final long serialVersionUID = -2790122130278004197L;

    @ApiModelProperty(value = "token",required = true)
    @NotBlank(message = "token不能为空")
    private String token;

    @ApiModelProperty(value = "用户名字",required = true)
    @NotBlank(message = "名字不能为空")
    private String realname;

    @ApiModelProperty(value = "用户宿舍",required = true)
    @NotBlank(message = "宿舍号不能为空")
    private String dormnum;

    @ApiModelProperty(value = "用户电话",required = true)
    @NotBlank(message = "电话不能为空")
    @Length(min = 11, max = 20, message = "电话长度不能少于11位")
    private String phone;

    @ApiModelProperty(value = "用户学号",required = true)
    @NotBlank(message = "学号不能为空")
    @Length(min = 9, max = 20, message = "学号长度不能少于10位")
    private String stunum;
}
